<?php
/**
 * Created by JiangJiaCai.
 * User: Administrator
 * Date: 2017/9/21 0021
 * Time: 10:58
 */

namespace ext\lib;


use com_jjcbs\lib\RPC;
use Validator;

class SimpleRpc extends RPC
{
    protected function check()
    {
        // TODO: Implement check() method.
        $vaildator = Validator::make($this->toArray() , $this->getRules());
        if ( $vaildator->fails()) throw new \Exception($vaildator->getMessageBag());
        return true;
    }

}